type NodeEnv = 'development' | 'production';
type ConfigItem = {
    baseUrl : string;
    isToken : boolean;
    timeout : number;
}
interface Config {
    development : ConfigItem,
    production : ConfigItem
}
const Config : Config = {
    development: {
        baseUrl: 'http://47.108.191.210:7071/api',
        isToken: true,
        timeout: 60000 //ms
    },
    production: {
        baseUrl: "https://www.yousanxia.com/ysxapi",
        isToken: true,
        timeout: 60000 //ms
    },
}
const NODE_ENV = (process.env.NODE_ENV as NodeEnv) || 'development';
export default {
    baseUrl: Config[NODE_ENV].baseUrl,
    isToken: Config[NODE_ENV].isToken,
    timeout: Config[NODE_ENV].timeout,
};

// const createArr = <T>(times : number, val : T) : T[] => {
//     let arr = [];
//     for (let i = 0; i < times; i++) {
//         arr.push(val);
//     }
//     return arr;
// }
// createArr(3, true);
// const swap = <T, K>(tuple : [T, K]) : [K,T] => {
//     return [tuple[1], tuple[0]];
// }
// swap(["1", true]);